/*
 * @Author: fah 1742484532@qq.com
 * @Date: 2024-08-28 16:46:26
 * @LastEditors: fah 1742484532@qq.com
 * @LastEditTime: 2024-09-13 14:06:14
 * @FilePath: \livetree-admin-server\src\main.ts
 * @Description: 指飞部-企业数字化管理系统
 * @version: 1.0
 */
import { NestFactory } from '@nestjs/core';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import { AppModule } from './app.module';
import { HttpResTransformInterceptor } from './interceptor/http-res.interceptor';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);

  const config = new DocumentBuilder()
    .setTitle('Cats example')
    .setDescription('The cats API description')
    .setVersion('1.0')
    .addTag('cats')
    .build();
  const document = SwaggerModule.createDocument(app, config);
  SwaggerModule.setup('api', app, document);

  app.useGlobalInterceptors(new HttpResTransformInterceptor());
  await app.listen(3000);
}
bootstrap();
